package com.aiwiown.face.request;

import com.aiwiown.face.ApiMethod;
import com.aiwiown.face.ApiObject;
import com.aiwiown.face.ApiRequest;
import com.aiwiown.face.internal.util.RequestParamUtils;
import com.aiwiown.face.response.SkinanAlyzeAdvancedResponse;

import java.util.Map;

/**
 * https://console.faceplusplus.com.cn/documents/140781002
 * @ClassName : SkinanAlyzeRequest
 * @Description : 该API可对人脸图片，进行面部皮肤状态检测分析。
 * @Author : dbin0123
 * @Date: 2020-05-23 11:39
 */
public class SkinanAlyzeAdvancedRequest implements ApiRequest<SkinanAlyzeAdvancedResponse> {

    private String apiVersion = "v1";
    private static String apiUrl = "/skinanalyze_advanced";

    private String bizContent;
    private ApiObject bizModel = null;

    @Override
    public ApiMethod getApiMethod() {
        return ApiMethod.POST;
    }

    @Override
    public String getApiUrl() {
        return "/" + this.apiVersion + apiUrl;
    }

    @Override
    public Map<String, String> getTextParams() throws IllegalAccessException {
        return RequestParamUtils.getTextParams(this.bizModel);
    }

    @Override
    public Map<String, byte[]> getByteArrayParams() throws IllegalAccessException {
        return RequestParamUtils.getByteArrayParams(this.bizModel);
    }

    @Override
    public String getApiVersion() {
        return null;
    }

    @Override
    public Class<SkinanAlyzeAdvancedResponse> getResponseClass() {
        return SkinanAlyzeAdvancedResponse.class;
    }

    @Override
    public String getBizContent() {
        return this.bizContent;
    }

    public void setBizModel(ApiObject bizModel) {
        this.bizModel = bizModel;
    }

    @Override
    public String signVersion() {
        return null;
    }

    @Override
    public String getSignInfo(String apiKey, String secretKey) throws Exception {
        return null;
    }
}
